Derivative

f[x_]:=.5((x^3)-6x)

xmin=-3;  xmax=3; stepsize=1;

tgline[p_]:=f[p]+f'[p](x-p);
derivpt[p_]:=Point[ {p, f'[p]}];
pts[p_]:=Table[derivpt[k], {k, xmin, p, stepsize}];
a=(xmax-xmin)/15;
pl=Plot[f[x], {x, xmin-a, xmax+a}, DisplayFunction->Identity];
fo=FullOptions[pl,PlotRange];
fprimes=Table[N[f'[k]], {k,xmin, xmax, stepsize}];
lowy =Min[fo[[2, 1]], fprimes];  hiy=Max[fo[[2, 2]], fprimes];
b=(fo[[2, 2]]-fo[[2, 1]])/10;
Plot[f'[x], {x, xmin, xmax}]
Animate[Plot[{f[x], tgline[p]}, {x, xmin-a, xmax+a},PlotStyle->{{ Thickness[.01]},{Hue[0], Thickness[.01]}},PlotRange->{lowy-b, hiy+b},Epilog->{ Hue[0], PointSize[.02],pts[p]}], {p, xmin, xmax, stepsize}]